Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1286 document config parameters in plugins #1297

Draft
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

jlahovnik
Copy link
Collaborator

  • docstrings for the configuration parameters have been added for all plugins
  • in case documentation was already existing it was standardized and updated
  • NOTE: for currently unused plugins (such as CSWSearch or S3RestDownload) the documentation might be incomplete due to missing examples; it should be updated when they are used again

@jlahovnik jlahovnik linked an issue Aug 14, 2024 that may be closed by this pull request
35 tasks
@jlahovnik jlahovnik self-assigned this Aug 14, 2024
Copy link
Contributor

github-actions bot commented Aug 14, 2024

Test Results

    4 files  ±0      4 suites  ±0   6m 18s ⏱️ +6s
  562 tests ±0    559 ✅ ±0   3 💤 ±0  0 ❌ ±0 
2 248 runs  ±0  2 154 ✅ ±0  94 💤 ±0  0 ❌ ±0 

Results for commit db46808. ± Comparison against base commit 0d7ff3c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 14, 2024

badge

Code Coverage (Ubuntu)

Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         312      59  81.09%   655-714, 816-867, 871
config.py                                      390      27  93.08%   80-82, 91, 99, 103-105, 173, 184, 635-637, 697-700, 743-744, 753-754, 859, 922-927, 929
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    769      74  90.38%   635, 679-682, 720, 764, 798, 851-856, 882, 973, 1041, 1179, 1264-1276, 1312, 1314, 1342, 1346-1357, 1370-1376, 1459-1462, 1495-1515, 1567, 1584-1588, 1600-1603, 1625-1632, 1942, 1966-1972, 2223, 2227-2230, 2241-2243, 2275
api/search_result.py                            59       4  93.22%   83, 92, 99, 113
api/product/__init__.py                          6       0  100.00%
api/product/_assets.py                          48       5  89.58%   75, 147, 155, 158-162
api/product/_product.py                        187      20  89.30%   70-72, 237-238, 313, 342, 399, 413-416, 429, 453-456, 499-505
api/product/metadata_mapping.py                680      68  90.00%   130-132, 227, 259-260, 306-307, 317-329, 331, 342, 348-360, 405-406, 443, 464-467, 490, 498-499, 575-576, 600-601, 607-610, 625-626, 775, 821, 992-997, 1124, 1138-1158, 1178, 1183, 1312, 1326, 1397, 1449, 1489-1493, 1508
api/product/drivers/__init__.py                  6       0  100.00%
api/product/drivers/base.py                      6       1  83.33%   38
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 21       2  90.48%   48, 55
plugins/manager.py                             130      12  90.77%   104-109, 159, 197, 219, 223, 247, 281-282
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           91       8  91.21%   158-160, 207-208, 234-236
plugins/apis/usgs.py                           180      31  82.78%   147, 249, 283, 318-320, 325, 351-352, 357, 387-394, 405-410, 432-438, 440-446, 469
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              19       0  100.00%
plugins/authentication/base.py                  17       2  88.24%   34, 47
plugins/authentication/generic.py               14       2  85.71%   49, 59
plugins/authentication/header.py                19       0  100.00%
plugins/authentication/keycloak.py              48       4  91.67%   146, 172-177
plugins/authentication/oauth.py                 13       7  46.15%   39-41, 45-48
plugins/authentication/openid_connect.py       187      17  90.91%   117, 131-157, 165, 289-292, 318
plugins/authentication/qsauth.py                34       1  97.06%   88
plugins/authentication/sas_auth.py              47       1  97.87%   76
plugins/authentication/token.py                 89      16  82.02%   94, 123, 125, 148-161, 217-221
plugins/authentication/token_exchange.py        36      20  44.44%   66-72, 84-114
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       1  90.00%   43
plugins/crunch/filter_date.py                   59      14  76.27%   49-54, 66, 75, 84, 87, 99-101, 110-112, 119
plugins/crunch/filter_latest_intersect.py       47       8  82.98%   52-53, 69, 78-81, 83, 90-93
plugins/crunch/filter_latest_tpl_name.py        31       1  96.77%   83
plugins/crunch/filter_overlap.py                66      18  72.73%   28-30, 68-71, 78-81, 87, 95, 106-122
plugins/crunch/filter_property.py               30       7  76.67%   54-59, 62-63, 79-83
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        491     163  66.80%   276, 289, 356-359, 373-377, 419-421, 425, 457-458, 464-468, 497, 529, 533, 540, 570-578, 582, 614-622, 633-635, 666-740, 758-818, 829-834, 846-859, 884, 899-901, 904, 914-922, 930-943, 953-984, 991-1003, 1041, 1067, 1112-1114, 1334
plugins/download/base.py                       253      51  79.84%   136, 164, 296-297, 314-320, 351-355, 361-362, 404, 407-421, 433, 437, 501-505, 535-536, 544-561, 568-576, 578-582, 625, 647, 669, 677
plugins/download/creodias_s3.py                 17       9  47.06%   50-64
plugins/download/http.py                       534     129  75.84%   225-237, 239-240, 272-275, 336-339, 341-342, 349-354, 372-387, 404-406, 418, 466, 473-479, 497, 511, 525, 533-535, 551-556, 567, 585, 627-631, 653, 693, 738, 752-758, 787-851, 869, 899-908, 930-931, 958-963, 969, 972, 988, 1005-1006, 1036-1037, 1044, 1105-1111, 1166-1167, 1173, 1183, 1219, 1255, 1273-1286, 1312-1314
plugins/download/s3rest.py                     116      24  79.31%   114, 150, 157, 192, 219-226, 229-231, 235, 246-252, 260-261, 264-268, 291, 312-315
plugins/search/__init__.py                      22       0  100.00%
plugins/search/base.py                         132      13  90.15%   104, 108, 119, 278, 298, 354-355, 375, 378-386
plugins/search/build_search_result.py          189      24  87.30%   87, 128-129, 135, 146, 274-277, 306, 341-358, 407, 436, 439, 449, 466, 494, 496
plugins/search/cop_marine.py                   236      50  78.81%   55, 63-65, 75-76, 81, 86-87, 103, 105, 108, 150-152, 164-165, 207, 213, 217, 221, 234, 245-246, 254, 282, 286, 301, 305, 309, 313, 317-321, 327-330, 333-347, 364, 413-417, 422, 434
plugins/search/creodias_s3.py                   55       3  94.55%   58, 76, 110
plugins/search/csw.py                          105      81  22.86%   94-95, 99-100, 108-156, 162-175, 183-215, 233-274
plugins/search/data_request_search.py          202      69  65.84%   165-168, 184, 195, 199-200, 211, 216, 221, 228, 241-244, 298-299, 303, 313-319, 324, 350-353, 361-372, 389, 391, 398-401, 403-404, 422-426, 459, 469, 480, 493, 499-514, 519
plugins/search/qssearch.py                     731     102  86.05%   447, 461, 465-471, 479-480, 492-496, 588-600, 644, 660, 670, 689-704, 741-744, 815-816, 864, 883, 890, 902, 959, 980, 983-984, 993-994, 1003-1004, 1013-1014, 1041, 1112-1117, 1121-1130, 1164, 1186, 1246, 1336, 1419, 1422-1423, 1505-1509, 1571, 1574, 1580-1581, 1602, 1629-1641, 1648, 1680-1682, 1692-1698, 1728, 1751, 1766, 1782, 1865-1868, 1873-1876, 1885, 1905-1906, 1915-1919, 1925
plugins/search/static_stac_search.py            75      13  82.67%   92-118, 134, 147
rest/__init__.py                                 4       2  50.00%   21-22
rest/cache.py                                   33       7  78.79%   35-37, 53-55, 59, 68
rest/config.py                                  26       0  100.00%
rest/constants.py                                6       0  100.00%
rest/core.py                                   251      64  74.50%   216-217, 273, 281, 298-316, 331-369, 460, 502-533, 680, 687-735
rest/errors.py                                  67       5  92.54%   106, 116, 127, 140-141
rest/server.py                                 188      24  87.23%   89, 112-114, 277-282, 310, 495-497, 514-519, 548, 550, 554-555, 559-560
rest/stac.py                                   319      63  80.25%   306, 328, 380-383, 410-437, 468-470, 493, 525-526, 608-648, 670-686, 778-782, 789, 843-844, 905, 995-997
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     176       5  97.16%   225-229, 282, 285, 353
rest/types/queryables.py                        56       1  98.21%   164
rest/types/stac_search.py                      126       7  94.44%   129, 175, 190-192, 200, 204
rest/utils/__init__.py                          93      12  87.10%   108-109, 128-130, 182, 192-206
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           23       3  86.96%   48, 60, 62
types/__init__.py                              114      14  87.72%   53, 70, 129-132, 199, 213-222, 232, 253, 266
types/bbox.py                                   43      19  55.81%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                           9       0  100.00%
types/queryables.py                             81       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/whoosh.py                                 15       0  100.00%
utils/__init__.py                              500      37  92.60%   85, 90, 194-195, 204-231, 234, 248, 328-332, 406-410, 429-431, 510, 525, 561-562, 926-929, 937-938, 976-977, 1148
utils/constraints.py                           119      38  68.07%   62, 89-98, 139, 144, 148, 159, 182-184, 194, 208-224, 233-244
utils/exceptions.py                             40       2  95.00%   98-99
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                28       1  96.43%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   30       8  73.33%   36, 38, 42, 76, 94-101
utils/requests.py                               55      11  80.00%   64, 86, 88, 90, 92, 94, 110, 118-120, 128
utils/rest.py                                   36       1  97.22%   55
utils/stac_reader.py                           111      45  59.46%   56-57, 63-85, 95-97, 101, 137, 153-156, 203-212, 222-252
TOTAL                                         9584    1614  83.16%

Diff against develop

Filename                                Stmts    Miss  Cover
------------------------------------  -------  ------  -------
config.py                                 +28       0  +0.54%
plugins/search/qssearch.py                +13      +6  -0.58%
plugins/search/static_stac_search.py       +3      +3  -3.44%
TOTAL                                     +44      +9  -0.02%

Results for commit: db46808

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Aug 14, 2024

badge

Code Coverage (Windows)

Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         312      59  81.09%   655-714, 816-867, 871
config.py                                      390      28  92.82%   80-82, 91, 99, 103-105, 173, 184, 635-637, 697-700, 743-744, 753-754, 859, 890, 922-927, 929
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    769      74  90.38%   635, 679-682, 720, 764, 798, 851-856, 882, 973, 1041, 1179, 1264-1276, 1312, 1314, 1342, 1346-1357, 1370-1376, 1459-1462, 1495-1515, 1567, 1584-1588, 1600-1603, 1625-1632, 1942, 1966-1972, 2223, 2227-2230, 2241-2243, 2275
api/search_result.py                            59       4  93.22%   83, 92, 99, 113
api/product/__init__.py                          6       0  100.00%
api/product/_assets.py                          48       5  89.58%   75, 147, 155, 158-162
api/product/_product.py                        187      20  89.30%   70-72, 237-238, 313, 342, 399, 413-416, 429, 453-456, 499-505
api/product/metadata_mapping.py                680      68  90.00%   130-132, 227, 259-260, 306-307, 317-329, 331, 342, 348-360, 405-406, 443, 464-467, 490, 498-499, 575-576, 600-601, 607-610, 625-626, 775, 821, 992-997, 1124, 1138-1158, 1178, 1183, 1312, 1326, 1397, 1449, 1489-1493, 1508
api/product/drivers/__init__.py                  6       0  100.00%
api/product/drivers/base.py                      6       1  83.33%   38
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 21       3  85.71%   48, 55, 68
plugins/manager.py                             130      12  90.77%   104-109, 159, 197, 219, 223, 247, 281-282
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           91       8  91.21%   158-160, 207-208, 234-236
plugins/apis/usgs.py                           180      31  82.78%   147, 249, 283, 318-320, 325, 351-352, 357, 387-394, 405-410, 432-438, 440-446, 469
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              19       0  100.00%
plugins/authentication/base.py                  17       2  88.24%   34, 47
plugins/authentication/generic.py               14       2  85.71%   49, 59
plugins/authentication/header.py                19       0  100.00%
plugins/authentication/keycloak.py              48       4  91.67%   146, 172-177
plugins/authentication/oauth.py                 13       7  46.15%   39-41, 45-48
plugins/authentication/openid_connect.py       187      17  90.91%   117, 131-157, 165, 289-292, 318
plugins/authentication/qsauth.py                34       1  97.06%   88
plugins/authentication/sas_auth.py              47       1  97.87%   76
plugins/authentication/token.py                 89      16  82.02%   94, 123, 125, 148-161, 217-221
plugins/authentication/token_exchange.py        36      20  44.44%   66-72, 84-114
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       1  90.00%   43
plugins/crunch/filter_date.py                   59      14  76.27%   49-54, 66, 75, 84, 87, 99-101, 110-112, 119
plugins/crunch/filter_latest_intersect.py       47      33  29.79%   49-54, 67-112
plugins/crunch/filter_latest_tpl_name.py        31       1  96.77%   83
plugins/crunch/filter_overlap.py                66      18  72.73%   28-30, 68-71, 78-81, 87, 95, 106-122
plugins/crunch/filter_property.py               30       7  76.67%   54-59, 62-63, 79-83
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        491     163  66.80%   276, 289, 356-359, 373-377, 419-421, 425, 457-458, 464-468, 497, 529, 533, 540, 570-578, 582, 614-622, 633-635, 666-740, 758-818, 829-834, 846-859, 884, 899-901, 904, 914-922, 930-943, 953-984, 991-1003, 1041, 1067, 1112-1114, 1334
plugins/download/base.py                       253      53  79.05%   136, 164, 231-233, 296-297, 314-320, 351-355, 361-362, 404, 407-421, 433, 437, 501-505, 535-536, 544-561, 568-576, 578-582, 625, 647, 669, 677
plugins/download/creodias_s3.py                 17       9  47.06%   50-64
plugins/download/http.py                       534     130  75.66%   225-237, 239-240, 272-275, 336-339, 341-342, 349-354, 372-387, 404-406, 418, 466, 473-479, 497, 511, 525, 533-535, 551-556, 567, 585, 627-631, 653, 693, 738, 752-758, 787-851, 869, 899-908, 930-931, 958-963, 969, 972, 988, 1005-1006, 1019, 1036-1037, 1044, 1105-1111, 1166-1167, 1173, 1183, 1219, 1255, 1273-1286, 1312-1314
plugins/download/s3rest.py                     116      24  79.31%   114, 150, 157, 192, 219-226, 229-231, 235, 246-252, 260-261, 264-268, 291, 312-315
plugins/search/__init__.py                      22       0  100.00%
plugins/search/base.py                         132      14  89.39%   104, 108, 119, 278, 298, 354-355, 375, 378-386, 388
plugins/search/build_search_result.py          189      31  83.60%   87, 128-129, 135, 146, 274-277, 306, 341-358, 407, 436, 439, 449, 466, 486-501
plugins/search/cop_marine.py                   236      50  78.81%   55, 63-65, 75-76, 81, 86-87, 103, 105, 108, 150-152, 164-165, 207, 213, 217, 221, 234, 245-246, 254, 282, 286, 301, 305, 309, 313, 317-321, 327-330, 333-347, 364, 413-417, 422, 434
plugins/search/creodias_s3.py                   55       3  94.55%   58, 76, 110
plugins/search/csw.py                          105      81  22.86%   94-95, 99-100, 108-156, 162-175, 183-215, 233-274
plugins/search/data_request_search.py          202      69  65.84%   165-168, 184, 195, 199-200, 211, 216, 221, 228, 241-244, 298-299, 303, 313-319, 324, 350-353, 361-372, 389, 391, 398-401, 403-404, 422-426, 459, 469, 480, 493, 499-514, 519
plugins/search/qssearch.py                     731     134  81.67%   447, 461, 465-471, 479-480, 492-496, 588-600, 644, 647, 660, 670, 689-704, 741-744, 815-816, 864, 883, 890, 902, 959, 980, 983-984, 993-994, 1003-1004, 1013-1014, 1041, 1112-1117, 1121-1130, 1164, 1186, 1246, 1336, 1419, 1422-1423, 1505-1509, 1571, 1574, 1580-1581, 1602, 1629-1641, 1648, 1680-1682, 1692-1698, 1728, 1751, 1766, 1782, 1848-1954
plugins/search/static_stac_search.py            75      13  82.67%   92-118, 134, 147
rest/__init__.py                                 4       2  50.00%   21-22
rest/cache.py                                   33      22  33.33%   35-37, 44-70
rest/config.py                                  26       1  96.15%   36
rest/constants.py                                6       0  100.00%
rest/core.py                                   251     139  44.62%   162, 164, 166, 169-170, 184-194, 206-207, 209-210, 216-217, 220, 223, 264-318, 331-369, 400-434, 449-465, 481-490, 502-533, 550, 592-641, 680, 687-735
rest/errors.py                                  67      47  29.85%   60, 65-100, 105-108, 115-118, 126-144, 152-157, 172-178
rest/server.py                                 188     188  0.00%    18-573
rest/stac.py                                   319      68  78.68%   240, 306, 328, 380-383, 410-437, 468-470, 493, 525-526, 608-648, 670-686, 713, 778-782, 789, 843-844, 850, 905, 943, 976, 995-997
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     176      16  90.91%   225-229, 262-264, 282, 285, 291, 295, 353, 370-380
rest/types/queryables.py                        56      13  76.79%   51-52, 59-60, 67-68, 94-99, 108-109, 164
rest/types/stac_search.py                      126      11  91.27%   127-129, 175, 190-192, 200, 204, 252, 255
rest/utils/__init__.py                          93      30  67.74%   79-85, 105, 108-109, 128-130, 143, 150, 175-183, 190-211
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           23       5  78.26%   43-44, 48, 60, 62
types/__init__.py                              114      39  65.79%   53, 66-70, 81-93, 120-122, 129-132, 172, 199, 209-225, 230, 232, 253, 258, 266, 276
types/bbox.py                                   43      19  55.81%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                           9       0  100.00%
types/queryables.py                             81       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/whoosh.py                                 15       0  100.00%
utils/__init__.py                              500      37  92.60%   85, 90, 194-195, 204-231, 234, 248, 328-332, 406-410, 429-431, 510, 525, 561-562, 926-929, 937-938, 976-977, 1148
utils/constraints.py                           119      38  68.07%   62, 89-98, 139, 144, 148, 159, 182-184, 194, 208-224, 233-244
utils/exceptions.py                             40       2  95.00%   98-99
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                28       1  96.43%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   30       8  73.33%   36, 38, 42, 76, 94-101
utils/requests.py                               55      11  80.00%   64, 86, 88, 90, 92, 94, 110, 118-120, 128
utils/rest.py                                   36       1  97.22%   55
utils/stac_reader.py                           111      45  59.46%   56-57, 63-85, 95-97, 101, 137, 153-156, 203-212, 222-252
TOTAL                                         9584    2058  78.53%

Diff against develop

Filename                                Stmts    Miss  Cover
------------------------------------  -------  ------  -------
config.py                                 +28       0  +0.55%
plugins/search/qssearch.py                +13      +9  -0.92%
plugins/search/static_stac_search.py       +3      +3  -3.44%
TOTAL                                     +44     +12  -0.02%

Results for commit: db46808

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

eodag/plugins/search/data_request_search.py Outdated Show resolved Hide resolved
eodag/plugins/search/qssearch.py Outdated Show resolved Hide resolved
@dalpasso dalpasso marked this pull request as draft August 20, 2024 14:09
@jlahovnik jlahovnik marked this pull request as ready for review August 20, 2024 15:51
@dalpasso dalpasso requested a review from sbrunato August 21, 2024 06:20
@sbrunato sbrunato force-pushed the 1286-document-config-parameters-in-plugins branch from 4215f14 to d6fc761 Compare September 27, 2024 14:33
Copy link
Collaborator

@sbrunato sbrunato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please edit docstrings layout, following HttpDownload, QueryStringSearch and ODataV4Search models:

  • describe config parameters inside config parameter description
  • link parameters to their PluginConfig class variable
  • if PluginConfig class variable (attribute ou TypedDict) is missing, add it

@sbrunato sbrunato marked this pull request as draft September 27, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document config parameters in plugins
3 participants